介绍下,我们需要使用的软件,一共有4个,分别是usplash、bootsplash、splashy、upower,其中usplash是我们ubuntu中自带的,它有速度最慢,最难看,而且只能美化开机画面的特点(不明白为什么把这个东西作进ubuntu);bootsplash是一个过时的产品,需要编译内核,但是也是唯一能美化tty的软件,安装它很麻烦,而且基本上失败的几率高的不像话(我的台式机无论如何不能成功,笔记本可以);splashy推荐使用,小巧玲珑,使用方便,可以随心所以自己把图和进度条放进去;upower同splashy,是后继产品,基本上可以说是目前最先进的,而且对ubuntu来说安装太方便了。
综合上面的4个软件,我个人最推荐使用splashy,因为非常方便,一个命令既可以安装主题,又能自己制作主题,和它同样的upower在我的台式机上不能正常显示开机画面(关机没问题),在笔记本上则都可以。
第一部分 更改usplash的颜色
usplash我们的ubuntu自带,使用它有很多限制,比如你不能随便找个图来代替默认的,本文最后将提供3个颜色的图,是已经做好的共大家替换,那么我首先与大家分享定制usplash的方法。
首先准备我们需要的装备:
代码: 全选
sudo apt-get install gcc libbogl-dev
开始编译:
代码: 全选
pngtobogl usplash-artwork.png > usplash-artwork.c
gcc -Os -g -I/usr/include/bogl -fPIC -c usplash-artwork.c -o usplash-artwork.o
gcc -shared -Wl,-soname,usplash-artwork.so usplash-artwork.o -o yourimage-splash.so
代码: 全选
sudo mkdir -p /usr/local/lib/usplash/
cp yourimage-splash.so /usr/local/lib/usplash/yourimage-splash.so
代码: 全选
sudo update-alternatives --install /usr/lib/usplash-artwork.so usplash-artwork.so /usr/local/lib/usplash/yourimage-splash.so 55
sudo dpkg-reconfigure linux-image-`uname -r`
第二部分 卸载usplash
因为后面的大部分操作都和usplash之间有矛盾,所以卸载它也是一件很重要的事。
卸载命令如下:
代码: 全选
sudo apt-get --purge remove usplash
sudo dpkg-reconfigure linux-image-`uname -r`
第三部分 安装和使用bootsplash
我现在强调一点,bootsplash是很麻烦的,而且很难成功,因为我的电脑使用了sata硬盘,而我编译了很多此都没办法成功,作出操作前请做好失败的心里准备。
我们先准备我们需要的东西,因为上一篇文章里我用内核2.6.14版进行说明,所以我今天也用2.6.14,而且编译的过程基本上是相同的,仅仅是一些需要注意的地方,首先我们来准备装备。
http://www.bootsplash.de/这个网站有我们需要的内核的补丁,我下载了用于2.6.14版的,各位朋友可以根据自己的需要下载不同版本。那么下载这个补丁后,其他方面同我在进一步优化ubuntu一文中写道的步骤一样,准备内核,打补丁,设置,编译内核,安装内核,那么我们在打补丁的时候就要把这个补丁也打进去,命令如下:
代码: 全选
cd /usr/src/linux
patch -p1 < /补丁位置/bootsplash-3.1.6-2.6.14.diff
代码: 全选
Code maturity level options --->
[*] Prompt for development and/or incomplete code/drivers
Processor type and features --->
[*] MTRR (Memory Type Range Register) support
Device Drivers --->
Block devices --->
<*> Loopback device support
<*> RAM disk support
[*] Initial RAM disk (initrd) support
Graphics support --->
[*] Support for frame buffer devices
[*] VESA VGA graphics support
Console display driver support --->
[*] Video mode selection support
<*> Framebuffer Console support
Bootsplash configuration --->
[*] Bootup splash screen
代码: 全选
deb http://debian.bootsplash.de unstable main
deb-src http://debian.bootsplash.de unstable main
代码: 全选
sudo apt-get update
sudo apt-get install bootsplash
代码: 全选
sudo apt-get install bootsplash-theme-ubuntu
代码: 全选
sudo splash -s -f /etc/bootsplash/themes/ubuntu/config/bootsplash-1024x768.cfg >> initrd.diy
sudo cp initrd.diy /boot
那么不好意思,你失败了,失败在于对硬盘的支持没有编译到内核,而仅仅是模块,我们要使用bootsplash就不能使用原来的initrd.img,所以这个问题处在设置内核编译部分的时候,但是这个错误很难纠正,因为电脑配置不同,那么需要编译的东西也不同,为了在我的台式机上解决这个问题,我甚至把所有scsi设备都編入内核,但是没有任何起色。kernel panic not syncing vfs unable to mount root fs on unknown block
最后再提醒各位朋友一次,bootsplash是很难成功的。
第四部份 安装和使用splash
首先需要使用第二部分删除usplash,然后我们需要两个包:
http://alioth.debian.org/download.php/1 ... .6_all.deb
http://alioth.debian.org/download.php/1 ... 6_i386.deb
下载完成后,我们开始我们的安装:
代码: 全选
sudo apt-get install libdirectfb-0.9-22
sudo dpkg -i splash-themes_0.1.6_all.deb
sudo dpkg -i splash_0.1.6_i386.deb
现在我来介绍下splashy的使用:
设置主题:
代码: 全选
sudo splashy_config -s ubuntusplashy
代码: 全选
sudo splashy_config -c
代码: 全选
name 名字
Description 描述
author 作者
X 进度条的坐标x
Y 进度条的坐标y
wigth 宽度
height 高度
red 进度条颜色 红
greed 进度条颜色 绿
blue 进度条颜色 蓝
alpha alpha管道 管透明的
boot 启动图片
shutdown 关机图片
error 错误图片
autoverbose 这个不懂 请明白的前辈指教一下
Progressbar on boot 是否显示进度条在启动时
Progressbar on shutdown 是否显示进度条在关闭时
这回启动的时候也要修改kernel一行,去掉splash,加上vga=792。
第五部分 安装使用upower
upower的安装很简单,只需要修改下源,把下面这行加入源中:
代码: 全选
deb http://repo.nanofreesoft.org/ubuntu breezy main
代码: 全选
sudo apt-get update
sudo apt-get install upower upower-theme-ubuntu
代码: 全选
sudo upower boot
sudo upower shutdown
这回也需要更改内核参数同样是去掉splash,加上vga=792。
第六部分 关于启动参数的修改
以上4中软件对启动参数的修改,不需要每次都改,只要更改
代码: 全选
/boot/grub/menu.lst
第七部分 结语
本文算是高级美化技巧了,但是我怀疑愿意尝试的人不多,而且特别是bootsplash。我推荐splashy,绝对让你没有损失,如果你做过从头优化ubuntu里的优化步骤,那么你会发现去掉splash这个参数后,启动会快很多,而使用splashy和upower都不会影响启动速度,本文不足之处应该很多,希望各位前辈多多补充。